﻿//#define LOGIN 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

using LiveChartsCore;
using LiveChartsCore.Drawing;
using LiveChartsCore.Defaults;
using LiveChartsCore.SkiaSharpView;
using LiveChartsCore.SkiaSharpView.Painting;
using LiveChartsCore.SkiaSharpView.WinForms;
using LiveChartsCore.SkiaSharpView.VisualElements;
using LiveChartsCore.SkiaSharpView.Drawing.Geometries;
using TCOChart2;
using SkiaSharp;

namespace TCOChart
{
    internal static class Program
    {
        public const int LOGIN = 0;
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // 防止中文乱码
            LiveCharts.Configure(config => config.HasGlobalSKTypeface(SKFontManager.Default.MatchCharacter('汉')));
#if LOGIN
            //登录窗口
            FormLogin formLogin = new FormLogin();
            formLogin.ShowDialog();
            if (formLogin.DialogResult == DialogResult.OK)
            {
                formLogin.Dispose();
                Application.Run(new FormTableSql());
            }
            else if (formLogin.DialogResult == DialogResult.Cancel)
            {
                formLogin.Dispose();
                return;
            }
#else
            //Application.Run(new Form1());
            //Application.Run(new FormSqlSugar());
            //Application.Run(new FormFlurl());
            //Application.Run(new FormMESUI_AntUI());
            Application.Run(new FormLogin());

#endif
        }
    }
}
